<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>案例：动态数据</title>
</head>
<body>
    <ul id="country">
    </ul>
    <script type="text/javascript">
        var countrylist=["濮阳","南乐","范县","清丰","台前"]
        for(var idx in countrylist){
            var text=countrylist[idx]
            var tag=document.createElement("li")// 创建li标签
            tag.innerText=text  //在li标签中写入内容
            var parenttag=document.getElementById("country") //找到id="country"的标签
            parenttag.appendChild(tag)//将li标签添加到id="country"的标签里面
        }

    </script>
</body>
</html>